<!-- 设备参数 -->
<template>
  <div class="dashboard-editor-container">
    <el-row style="background: #fff; padding: 16px; margin-bottom: 32px">
      <el-tabs type="border-card" v-model="activeName" @tab-click="handleClick">
        <el-tab-pane label="基本参数" name="basicParameters"><basicParameters v-if="activeName === 'basicParameters'"></basicParameters></el-tab-pane>
        <el-tab-pane label="终端代理" name="terminalAgent"><terminalAgent v-if="activeName === 'terminalAgent'"></terminalAgent></el-tab-pane>
        <el-tab-pane label="网络服务" name="netGlobal"><netGlobal v-if="activeName === 'netGlobal'"></netGlobal></el-tab-pane>
        <el-tab-pane label="设备维护" name="maintain"><maintain v-if="activeName === 'maintain'"></maintain></el-tab-pane>
        <el-tab-pane label="文件共享" name="fileSharing"><fileSharing v-if="activeName === 'fileSharing'"></fileSharing></el-tab-pane>
        <el-tab-pane label="性能阈值" name="performance"><performance v-if="activeName === 'performance'"></performance></el-tab-pane>
        <el-tab-pane label="病毒检测" name="virus"><virus v-if="activeName === 'virus'"></virus></el-tab-pane>
      </el-tabs>
    </el-row>
  </div>
</template>

<script>
import basicParameters from './children/basicParameters.vue'
import maintain from './children/maintain.vue'
import fileSharing from './children/fileSharing.vue'
import performance from './children/performance.vue'
import virus from './children/virus.vue'
import terminalAgent from './children/terminalAgent.vue'
import netGlobal from './children/netGlobal.vue'
export default {
  components:{
    basicParameters,maintain,fileSharing,performance,virus,terminalAgent,netGlobal
  },
  data(){
    return{
      activeName:'basicParameters'
    }
  },
  created(){
    if (sessionStorage.getItem('handle_order_name') == null) {
      this.activeName = 'basicParameters'
    } else {
      this.activeName = sessionStorage.getItem('handle_order_name')
    }
  },
  methods:{
    handleClick (tab, event) {
      sessionStorage.setItem('handle_order_name', tab.name)
    }
  }
}
</script>
<style lang="scss" scoped>

</style>
